#ifndef STRUCTEDGE_HPP
#define STRUCTEDGE_HPP

#include "structEdgeBase.hpp"
#include "structMesh.hpp"

namespace hms {

template<>
class EdgeTraits<StructEdge> : public StructEdgeTraits
{
public:
	using MeshType    = StructMesh;
	using NormalVector = Matrix2Xs::ConstColXpr;
};

class StructEdge : public StructEdgeBase<StructEdge>
{
public:
	using Traits = EdgeTraits<StructEdge>;
	using NormalVector = Traits::NormalVector;

private:
	StructEdge( const StructMesh&, Index );

	auto normalImp      () const -> NormalVector;
	auto lengthImp      () const -> scalar;
	auto midpointImp    () const -> Vector2s;
	auto intersectionImp() const -> Vector2s;

	friend EdgeBase;
	friend StructMeshBase<StructMesh>;
};

}


#endif